#!/usr/bin/python
# -*- coding: utf-8 -*-

'''
Introduction to Programming in Java - An Interdisciplinary Approach

All book programs ported to Python by
Scott C. King (revisionx at {gee}ma1l <dot> c0m).

All program examples pass Pylint with a perfect 10.00 score.
Pylint:  http://www.pylint.org/


Exercise 1.4.6 - Write a code fragment that prints the contents of a
two-dimensional boolean array, using * to represent true and a space
to represent false. Include row and column numbers.


Syntax:
python two_dimensional_boolean_array.py

'''


def main():
    ''' Replace true w/* and false w/space in two-dim boolean array '''

    array = [True, False, True, False, True]
    array = [array] * 5

    for _ in array:
        print _

    print
    for row in range(5):
        for col in range(5):
            if array[row][col] == True:
                print '*',
            else:
                print '_',
        print


if __name__ == '__main__':
    main()
